package cn.ren.cloud.mapper;

import cn.ren.cloud.domain.Course;
import cn.ren.cloud.domain.Teacher;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author Ren
 * @since 2022-12-31
 */
public interface CourseMapper extends BaseMapper<Course> {

    /**
     * 添加老师课程中间表
     *
     * @param courseId
     * @param teacharIds
     */
    void saveCourseTeacher(@Param("courseId") Long courseId, @Param("teacharIds") List<Long> teacharIds);

    /**
     * 查询老师和课程中间表
     *
     * @param id
     * @return
     */
    List<Teacher> selectTeachersByCourseId(Long id);
}
